package com.cxs.xiaomi.utils;

import java.util.Base64;

/*
 * @Author:cxs
 * @Date:2021/9/15  9:43
 * @Version 1.0
 * @Motto:放下杂念,只为迎接明天更好的自己
 * */
public class Base64Utils {
    //base64编码
    public static String encode(String msg){
        return Base64.getEncoder().encodeToString(msg.getBytes());
    }
    //base64解码
    public static String decode(String msg){
        return new String(Base64.getDecoder().decode(msg));
    }
}
